<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"> 
 
<head> 
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
	<title>湖南省自来水公司营销管理信息系统</title> 
	
	<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/text.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/form.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/buttons.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/grid.css" type="text/css" media="screen" title="no title" />	
	<link rel="stylesheet" href="../css/layout.css" type="text/css" media="screen" title="no title" />	
	
	<link rel="stylesheet" href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/jquery.visualize.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/facebox.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/uniform.default.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/dataTables.css" type="text/css" media="screen" title="no title" />
	
	<link rel="stylesheet" href="../css/custom.css" type="text/css" media="screen" title="no title">

</head> 
 
<body> 

<div>

    <div id="qiqi"></div><script>window.onload = function(){$("#qiqi").load("../dropDownMenu.html")}</script>

	
	<div id="content"  class="xgrid">
		
 		
		<div id="app" class="x12">
		
		
			
			
			<div id="facebox_delete" style="display: none">
				<div style="height:80px;text-align:center;padding-top:50px;">
					确认禁用吗？
				</div>
				
				<div class="dialogbutton center">
					<a class="btn" href="javascript:closeDialog();" style="width:60px;">是</a>  
					<a class="btn btn-grey" href="javascript:closeDialog();" style="width:60px;">否</a>
				</div>
			</div>
			
			<h2>附加费设定</h2>
			
			<p><button class="btn-icon btn-plus" onClick="location='sys_surcharge_add.html';"><span></span>添加附加费</button></p>
				
			<table class="data display">
					<thead>
						<tr>
							<th width="55">附加费ID</th>
							<th width="70">附加费编码</th>
							<th width="70">附加费简称</th>
							<th width="70">附加费全称</th>
							<th width="70">附加费单价（元/吨）</th>
							<th>附加费征收范围</th>
							<th width="80">备注</th>
							<th width="160"></th>
						</tr>
					</thead>
					<tbody>
						<tr v-for="c in SyCostTypes" class="odd">
							<td v-text="c.id">1</td>
							<td v-text="c.costTypeName">LJF</td>
							<td v-text="c.costTypeName">垃圾费</td>
							<td v-text="c.fullName">居民生活垃圾处理费</td>
							<td v-text="c.price">0.20</td>
							<td v-text="c.surchargeText">生活用水</td>
							<td></td>
							<td class="center">
								<button class="btn-icon btn-small btn-blue btn-star" @Click="update(c.id)"><span></span>修改</button>
								<button class="btn-icon btn-small btn-red btn-cross" @Click="del(c.id)"><span></span>禁用</button>
							</td>
						</tr>
					</tbody>
				</table>
			
		</div> <!-- .x12 -->
		
	</div> <!-- #content -->
	
	<div id="footer">		
		<div class="content_pad">			
			<p>&copy; 2013-11 版权所有 <a href="#">湖南省自来水公司</a>.   技术支持 <a href="#">职业教育</a>.</p>
		</div> <!-- .content_pad -->
	</div> <!-- #footer -->
	
</div> <!-- #wrapper -->

<script src="../js/jquery/jquery-1.5.2.min.js"></script>
<script src="../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="../js/misc/excanvas.min.js"></script>
<script src="../js/jquery/facebox.js"></script>
<script src="../js/jquery/jquery.visualize.js"></script>
<script src="../js/jquery/jquery.dataTables.min.js"></script>
<script src="../js/jquery/jquery.tablesorter.min.js"></script>
<script src="../js/jquery/jquery.uniform.min.js"></script>
<script src="../js/jquery/jquery.placeholder.min.js"></script>

<script src="../js/widgets.js"></script>
<script src="../js/dashboard.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    function queryAll(){
        $.getJSON("/system/queryAllFWSyCostType","",function (json) {
            app.SyCostTypes = json;
            /*$.each(json,function () {
                alert(this.id);
            })*/
        })
    }
    var app = new Vue({
            el: '#app',
            data: {
                SyCostTypes:"",
                SyCostType:{
                    id:"",
                    kind:"",
                    code:"",
                    costTypeName:"",
                    fullName:"",
                    price:"",
                    surchargeText:"",
                    remark:"",
                    diskabled:"",
                }
            },
            mounted() {
                // methods里面定义的方法, 需要赋值给window
                window.del = this.del;
            },
            methods:{
                del(sid){
                    showDialog("确认删除吗？",function(){
                        $.ajax({
                            type:"delete",
                            data:"id="+sid,
                            url:"/system/delDisableSyCostType",
                            success:function () {
                                queryAll();
                            }
                        })
                        // window.print();
                    },"facebox_delete");
                },
                update(id){
                    location='sys_surcharge_add.html?id='+id;
                }
            },
            watch:{

            },
            created(){
                queryAll();
            }
        })
</script>
<script type="text/javascript">
	
$(document).ready ( function () 
{
	Dashboard.init ();		
});

</script>

</body> 
 
</html>